<?php
//$db = db::getInstance();
//$name_table=ucfirst($name_table).'Model';
//$name_table=str_replace("_","",$name_table);
//$table=new $name_table();
$name_table = $_POST['table_name'];
mysql_connect("localhost", "root");
mysql_select_db("dynamic");

$req = "SHOW COLUMNS FROM `". $name_table."`";
 $result = mysql_query($req);
    while ($ligne = mysql_fetch_array($result)) {
        echo "<option>" . $ligne[0] . "</option>";
    }
?>